﻿@model JTWEB3.Views.News.SearchModel
@{
    ViewData["Title"] = "Search";
}


@if (Model.NewsList.code == 0)
{
    <img src="~/images/banner1.svg" alt="检测" />
    <h2 class="mt-5" style="text-align:center;">@Model.searchResult</h2>
    <div class="mt-5 mb-5" style="text-align:center;">
        <a class="btn btn-outline-success" asp-controller="Home"
           asp-action="Index">返回首页</a>
    </div>

}
else
{
    <div class="news-list container tab-pane active mt-5 mb-5" id="news">
        @foreach (var m in Model.NewsList.data)
        {
            <div class="news-list-item row clearfix">
                <div class="col-sm-5"> <img src="@m.Image" /></div>

                <div class="col-sm-7">
                    <a asp-controller="News" asp-action="Details" asp-route-id="@m.Id" class="title">@m.Title</a>@m.Contents
                    <div class="info">
                        <span class="avatar"><img src="~/images/5.png" /></span>
                        <span>匿名</span>.
                        <span>评论:@m.CommentCount</span>
                        <span>评论时间:@m.PublishDate</span>
                    </div>
                </div>

            </div>
        }


    </div>
}
